Skip to content

feat: make solana-inflation crate no_std compatible#535

Open
sonicfromnewyoke wants to merge 1 commit into
anza-xyz:masterfrom
sonicfromnewyoke:sonic/no-std-solana-inflation
Open

feat: make solana-inflation crate no_std compatible#535
sonicfromnewyoke wants to merge 1 commit into
anza-xyz:masterfrom
sonicfromnewyoke:sonic/no-std-solana-inflation

Conversation

@sonicfromnewyoke

Copy link
Copy Markdown
Contributor

Problem

solana-inflation crate is no_std-friendly but not really no_std compatible

the main obstacle in making this crate compatible with no_std environment is powf() method on f64 type which doesn't exist.

Proposed Solution

import num_traits::Float trait, which is accessible in libm feature.

Alternatives

  1. import libm directly
  2. copy/paste only powf() function from libm crate, and use it instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant